#ifndef _MEM_MGR_H_
#define _MEM_MGR_H_

/*******************************************************************************
** CopyRight (c) 2005-2008 SKY-MOBI Ltd. All rights reserved.
** Filename:  MEM_MGR.h
** Creator:   huangxiaohua
** Version:   0.0
** Date:      
** Description:

 *******************************************************************************/
typedef struct
{
	uint8* item;
	uint16 len;
	uint16 bufLen;
	uint16 stepLen;
	uint16 reserve;
}MEM_MGR_T;


// MEM_MGR_T* MemMgr_Init(uint16 len, uint16 step, uint16 itemSize);
 int32 MemMgr_Init(MEM_MGR_T*xpm, uint16 len, uint16 step, uint16 itemSize);

 int32 MemMgr_AdjustLen(MEM_MGR_T* pm, int32 len, int32 offset, uint16 itemSize);


 void MemMgr_RemoveItem(MEM_MGR_T* pm, int32 offset, int32 size);


 void MemMgr_ReSet(MEM_MGR_T* xpm, uint16 itemSize);



#endif

